import React from 'react'
import { Route, Routes ,Navigate} from 'react-router-dom';
import { NavBar } from 'antd-mobile';
import Navbar from '../NavBar';

import Home from '../../pages/Home';
import SearchHouse from '../../pages/SearchHouse';
import Informate from '../../pages/Information';
import My from '../../pages/My';

import styles from './index.module.scss'
export default function Content() {
  return (
    <div className={styles.app}>
    
      <div className={styles.body}>
        <Routes>
          <Route path='/home' element={<Home/>}>
          </Route>
          <Route path='/search' element={<SearchHouse/>}>
          
          </Route>
          <Route path='/message' element={<Informate/>}>
          </Route>
          <Route path='/me' element={<My/>}>
          </Route>
          <Route path='/' element={
            <Navigate to="/home"/>
          }></Route>
        </Routes>
      </div>
      <div className={styles.bottom}>
        <Navbar />
      </div>
    </div>
  );
};

